package com.example.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@Slf4j
public class HelloController {

    @GetMapping("/hello")
    @SentinelResource(value = "hello_res",blockHandler = "blockHandler")
    public String hello(){
//        log.info("hello666");
        return "hello";
    }

    public String fallbackhello(){
        return "服务器繁忙fallbackhello";
    }
    public String blockHandlerhello(){
        return "请求过多blockHandlerhello";
    }

}
